﻿// <copyright file="ValueChanged.cs" company="Signal Processing Lab, Wuhan University">
// Copyright (c) 2009-2010 All Right Reserved
// </copyright>
// <author>Xinping Deng</author>
// <email>dentoby@gmail.com</email>
// <date>2010-4</date>
// <summary>This is part of Image.NET project.</summary>

namespace SPLWHU.Core
{
    using System;

    /// <summary>
    /// The value changed event.
    /// </summary>
    /// <param name="sender">The event sender</param>
    /// <param name="e">The event args</param>
    public delegate void ValueChanged(object sender, ValueChangedArgs e);

    /// <summary>
    /// The value changed event argumnets.
    /// </summary>
    public class ValueChangedArgs : EventArgs
    {
        /// <summary>
        /// The current value.
        /// </summary>
        private object value;

        /// <summary>
        /// The previous value.
        /// </summary>
        private object previousValue;

        /// <summary>
        /// Initializes a new instance of the <see cref="ValueChangedArgs"/> class.
        /// </summary>
        /// <param name="previousValue">The previous value.</param>
        /// <param name="value">The current value.</param>
        public ValueChangedArgs(object previousValue, object value)
        {
            this.previousValue = previousValue;
            this.value = value;
        }

        /// <summary>
        /// Gets or sets the current value.
        /// </summary>
        /// <value>The current value.</value>
        public object Value
        {
            get { return this.value; }
            set { this.value = value; }
        }

        /// <summary>
        /// Gets or sets the previous value.
        /// </summary>
        /// <value>The previous value.</value>
        public object PreviousValue
        {
            get { return this.previousValue; }
            set { this.previousValue = value; }
        }
    }
}
